# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=akonadi-import-wizard
pkgver=20.04.3
pkgrel=0
arch="all !ppc64le !s390x !armhf !mips !mips64" # Limited by kmailtransport -> libkgapi -> qt5-qtwebengine
url="https://kontact.kde.org/"
pkgdesc="Import data from other mail clients to KMail"
license="GPL-2.0-or-later AND LGPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev kwallet-dev kconfig-dev kdbusaddons-dev kauth-dev kdoctools-dev kcrash-dev kio-dev akonadi-dev kcontacts-dev kidentitymanagement-dev kmailtransport-dev mailcommon-dev messagelib-dev pimcommon-dev libkdepim-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/akonadi-import-wizard-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="35f28bf0c51398a744b1e1d3008100350bf7b11b7598f9333851a748fa5afe49db14d37977076872e757f9104eee6dd3fedfec0223115d30985069517a1541a9  akonadi-import-wizard-20.04.3.tar.xz"
